<template>
  <div class="person">
      <h2>当前求和为：{{ sum }}</h2>
      <button @click="add">点我sum+1</button>
      <hr>
      <img v-for="(dog,index) in dogList" :src="dog"  alt="" :key="index"/>
      <button @click="getDog">在来一只小狗</button>
  </div>
</template>
<script setup lang="ts" name="Person">
  import useSum from '@/hooks/useSum';
  import useDog from '@/hooks/useDog';

  const {sum,add} = useSum()
  const {dogList,getDog} = useDog()


</script>
<style>
  .person{
    background-color: skyblue;
    box-shadow: 0 0 10px;
    border-radius: 10px;
    padding: 20px;
  }

  img{
    height: 100px;
    margin-right: 10px;
  }
</style>